<?php

namespace App\Http\Controllers\Api;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Repos\ProductRepo;

class ProductController extends Controller
{
    public function getList(Request $request)
    {
    	$where = [];
    	if($request->shop_id) {
    		$where['shop_id'] = (int)$request->shop_id;
    	}

    	$rs['status'] = false;
    	$list = ProductRepo::getList($where,$num=50);
    	if($list) {
    		$rs['status'] = true;
    		$rs['data'] = $list;
    	}
    	return response()->json($rs);

    	
    }
}
